<template>
  <table border="0">
    <tr>
        <td v-for="items in tableData">
          {{items.name}}
        </td>
    </tr>
    <tr>
        <td v-for="items in stausa">
          <div class="btn-box" :class="{btn_active:items}"></div>
        </td>
    </tr>
    <tr>
        <td v-for="items in tableData1">
          {{items.name}}
        </td>
    </tr>
    <tr>
        <td v-for="items in stausaa">
          <div class="btn-box" :class="{btn_active:items}"></div>
        </td>
    </tr>
    <tr>
        <td v-for="items in tableData2">
          {{items.name}}
        </td>
    </tr>
    <tr>
      <td v-for="(items,index) in stausaaa" v-show="index <= 5">
        <div class="btn-box" :class="{btn_active:items}"></div>
      </td>
    </tr>
  </table>
</template>
<script>
export default {
  props: [
    'stausa',
    "stausaa",
    "stausaaa"
  ],
  data () {
    return {
        tableData:[
          {
            name:"维护时间到警告",
          },
          {
            name:"紧急停机",
          },
          {
            name:"超速报警",
          },
          {
            name:"欠速报警",
          },
          {
            name:"超频报警",
          },
          {
            name:"低频报警",
          },
          {
            name:"过压报警",
          },
          {
            name:"欠压报警",
          }
        ],
        tableData1:[
          {
            name:"过流报警",
          },
          {
            name:"起动失败",
          },
          {
            name:"高水温报警",
          },
          {
            name:"低油压报警",
          },
          {
            name:"停机失败报警",
          },
          {
            name:"低燃油位报警",
          },
          {
            name:"电池电压低报警",
          },
          {
            name:"电池电压高报警",
          }
        ],
        tableData2:[
          {
            name:"转速信号消失",
          },
          {
            name:"冷却液低警告",
          },
          {
            name:"水温传感器开路",
          },
          {
            name:"油压传感器开路",
          }
        ]
    }
  },
  computed: {
  },
  methods: {
    closeMyself () {
      this.$emit('on-close')
    }
  },
}
</script>
<style scoped>
table{
  width: 100%;
  border-collapse:collapse;
  border-top:1px solid #f2f2f2;
}
table td{
  max-width: 100px;
  height: 30px;
  text-align: center;
  border: 0px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-size: 14px;
  border-right:1px solid #f2f2f2;
}
table tr{
  height: 30px;
  overflow: hidden;
  border-bottom:1px solid #f2f2f2;
  border-left:1px solid #f2f2f2;
}
.btn-box{
  width:13px;
  height:13px;
  border-radius: 50%;
  background: #13ce66;
  box-shadow: 2px 2px 3px #bfbeb8;
  margin: auto;
}
.btn_active{
  background: #ff4949;
}
</style>
